﻿using System;

using mvcForum.Core;
using mvcForum.Core.Interfaces;
using mvcForum.Core.Interfaces.Data;

namespace mvcForum.AddOns.StopForumSpam {

	public class StopForumSpamInstall : IInstallable {
		private readonly IRepository<AddOnConfiguration> configRepo;

		public StopForumSpamInstall(IRepository<AddOnConfiguration> configRepo) {
			this.configRepo = configRepo;
		}

		public void Install() {
			StopForumSpamConfiguration conf = new StopForumSpamConfiguration(this.configRepo);
			conf.Enabled = false;
			conf.RunAsynchronously = false;
			conf.Delay = 5;
			conf.MarkAsSpamOnHit = true;
			conf.CheckNewUsers = true;
		}
	}
}